package com.example.controller;

import com.example.pojo.User;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;

/**
 * @program: springboot_course
 * @description: 用户控制层
 * @author: ChenZhiXiang
 * @create: 2019-06-11 09:21
 **/
@RestController
public class UserController {

    @PostMapping("/user")
    public String printValidatedUserInfo(@RequestBody @Valid User user) {

        return user.toString();
    }

}
